<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.hs</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Haskell) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;">-- test file for Haskell syntax highlighting in KDE's Kate</span>

<span style="color:#7a7c7d;">-- The test file for literate Haskell can be easily created like this:</span>
<span style="color:#7a7c7d;">--  cat highlight.hs | sed -e &quot;s|^|&gt; |&quot; -e &quot;s|&gt; -- ||&quot; -e &quot;s|^&gt; $||&quot; &gt; highlight.lhs</span>
<span style="color:#7a7c7d;">-- You only have to manually edit the multi-line comment below.</span>

<span style="color:#7a7c7d;">-- this is a single-line comment</span>

<span style="color:#7a7c7d;">{- this is a multi-line comment</span>

<span style="color:#7a7c7d;">Things like &quot;a string&quot; or a </span><span style="color:#7a7c7d;text-decoration:underline;">'c'</span><span style="color:#7a7c7d;"> character shouldn't be highlighted in here.</span>

<span style="color:#7a7c7d;">-- I could even start a new</span>
<span style="color:#7a7c7d;">-- one-line comment.</span>

<span style="color:#7a7c7d;">-}</span>

<span style="font-weight:bold;">import</span> <span style="color:#2980b9;">Prelude</span> <span style="color:#7a7c7d;">--</span>

<span style="color:#7a7c7d;">-- a data definition</span>

<span style="font-weight:bold;">data</span> <span style="color:#2980b9;">Tree</span> a <span style="color:#27ae60;">=</span> <span style="color:#2980b9;">Br</span> (<span style="color:#2980b9;">Tree</span> a) (<span style="color:#2980b9;">Tree</span> a) | <span style="color:#2980b9;">Leaf</span> a | <span style="color:#2980b9;">Nil</span> <span style="font-weight:bold;">deriving</span> (<span style="color:#2980b9;">Show</span>, <span style="color:#2980b9;">Eq</span>)


<span style="color:#7a7c7d;">-- function definition, &quot;funnyfunction::&quot;, </span><span style="color:#7a7c7d;text-decoration:underline;">&quot;Integer&quot;</span><span style="color:#7a7c7d;">, </span><span style="color:#7a7c7d;text-decoration:underline;">&quot;Int&quot;</span><span style="color:#7a7c7d;">, </span><span style="color:#7a7c7d;text-decoration:underline;">&quot;Bool&quot;</span><span style="color:#7a7c7d;"> should be highlighted</span>

<span style="color:#27ae60;">funnyfunction</span><span style="color:#27ae60;">::</span>(<span style="color:#2980b9;">Tree</span> a)<span style="color:#27ae60;">=&gt;</span>[a]<span style="color:#27ae60;">-&gt;</span><span style="color:#2980b9;">Integer</span><span style="color:#27ae60;">-&gt;</span><span style="color:#2980b9;">Int</span><span style="color:#27ae60;">-&gt;</span><span style="color:#2980b9;">Bool</span>


<span style="color:#7a7c7d;">-- strings and chars</span>
<span style="color:#7a7c7d;">-- first line of function definitions (type declaration) should be highlighted</span>

<span style="color:#27ae60;">strangefunction</span><span style="color:#27ae60;">::</span><span style="color:#2980b9;">Int</span><span style="color:#27ae60;">-&gt;</span><span style="color:#2980b9;">String</span>
strangefunction <span style="color:#f67400;">1</span> <span style="color:#27ae60;">=</span> <span style="color:#f44f4f;">&quot;hello&quot;</span>
strangefunction <span style="color:#f67400;">2</span> <span style="color:#27ae60;">=</span> <span style="color:#f44f4f;">&quot;what's up&quot;</span>
strangefunction <span style="color:#f67400;">3</span> <span style="color:#27ae60;">=</span> (strangefunction <span style="color:#f67400;">1</span>) ++ <span style="color:#f44f4f;">&quot;, &quot;</span> ++ (strangefunction <span style="color:#f67400;">2</span>)
strangefunction <span style="color:#f67400;">4</span> <span style="color:#27ae60;">=</span> <span style="color:#3daee9;">'a'</span>:<span style="color:#3daee9;">'b'</span>:<span style="color:#3daee9;">'c'</span>:<span style="color:#3daee9;">'&quot;'</span>:[] <span style="color:#7a7c7d;">-- will return &quot;abc&quot;</span>
strangefunction <span style="color:#f67400;">5</span> <span style="color:#27ae60;">=</span> <span style="color:#3daee9;">'\n'</span>:[]
strangefunction <span style="color:#f67400;">6</span> <span style="color:#27ae60;">=</span> <span style="color:#3daee9;">'\invalidhaskell'</span>:[]

<span style="color:#7a7c7d;">-- function name including the single quote character</span>
<span style="color:#7a7c7d;">-- and infix operator (`div`)</span>

<span style="color:#27ae60;">justtesting'</span><span style="color:#27ae60;">::</span><span style="color:#2980b9;">Int</span><span style="color:#27ae60;">-&gt;</span><span style="color:#2980b9;">Int</span>
justtesting' <span style="color:#f67400;">2</span> <span style="color:#27ae60;">=</span> <span style="color:#f67400;">2</span>+<span style="color:#f67400;">1</span>
justtesting' <span style="color:#f67400;">9</span> <span style="color:#27ae60;">=</span> <span style="color:#f67400;">7</span> <span style="color:#27ae60;">`div`</span> <span style="color:#f67400;">2</span>

<span style="color:#7a7c7d;">-- same definition as above, slightly different function name and a couple more whitespaces</span>

<span style="color:#27ae60;">justtesting''	</span><span style="color:#27ae60;">::</span>	<span style="color:#2980b9;">Int</span> <span style="color:#27ae60;">-&gt;</span> <span style="color:#2980b9;">Int</span>
justtesting''   <span style="color:#f67400;">2</span> <span style="color:#27ae60;">=</span> <span style="color:#f67400;">3</span>
justtesting''	<span style="color:#f67400;">9</span>	<span style="color:#27ae60;">=</span>   <span style="color:#f67400;">3</span> + <span style="color:#f67400;">9</span> - <span style="color:#f67400;">9</span>

<span style="color:#7a7c7d;">-- the following lines are copied out of Haskell's &quot;Prelude.hs&quot;</span>

<span style="font-weight:bold;">infixl</span> <span style="color:#f67400;">7</span>  *, /, <span style="color:#27ae60;">`quot`</span>, <span style="color:#27ae60;">`rem`</span>, <span style="color:#27ae60;">`div`</span>, <span style="color:#27ae60;">`mod`</span>, :%, %


<span style="color:#7a7c7d;">-- everything highlighted except the &quot;a&quot;</span>

<span style="font-weight:bold;">class</span> <span style="color:#2980b9;">Bounded</span> a <span style="font-weight:bold;">where</span>
    <span style="color:#8e44ad;">minBound</span>,<span style="color:#27ae60;"> maxBound </span><span style="color:#27ae60;">::</span> a

<span style="font-weight:bold;">class</span> (<span style="color:#2980b9;">Num</span> a, <span style="color:#2980b9;">Ord</span> a) <span style="color:#27ae60;">=&gt;</span> <span style="color:#2980b9;">Real</span> a <span style="font-weight:bold;">where</span>
<span style="color:#27ae60;">    toRational     </span><span style="color:#27ae60;">::</span> a <span style="color:#27ae60;">-&gt;</span> <span style="color:#2980b9;">Rational</span>

<span style="color:#7a7c7d;">-- finally, some keyword lists</span>

<span style="color:#7a7c7d;">-- keywords</span>

<span style="font-weight:bold;">case</span>, <span style="font-weight:bold;">class</span>, <span style="font-weight:bold;">data</span>, <span style="font-weight:bold;">deriving</span>, <span style="font-weight:bold;">do</span>, <span style="font-weight:bold;">else</span>, <span style="font-weight:bold;">family</span>, <span style="font-weight:bold;">forall</span>, <span style="font-weight:bold;">if</span>, <span style="font-weight:bold;">in</span>, <span style="font-weight:bold;">infixl</span>, <span style="font-weight:bold;">infixr</span>,
<span style="font-weight:bold;">instance</span>, <span style="font-weight:bold;">let</span>, <span style="font-weight:bold;">module</span>, <span style="font-weight:bold;">of</span>, <span style="font-weight:bold;">pattern</span>, <span style="font-weight:bold;">primitive</span>,
<span style="font-weight:bold;">then</span>, <span style="font-weight:bold;">type</span>, <span style="font-weight:bold;">where</span>

<span style="color:#7a7c7d;">-- infix operators</span>

<span style="color:#8e44ad;">quot</span>, <span style="color:#8e44ad;">rem</span>, <span style="color:#8e44ad;">div</span>, <span style="color:#8e44ad;">mod</span>, <span style="color:#8e44ad;">elem</span>, <span style="color:#8e44ad;">notElem</span>, <span style="color:#8e44ad;">seq</span>

<span style="color:#7a7c7d;">-- this stuff is not handled yet</span>

!!, %, &amp;&amp;, $!, $, *, **, -,., /=, &lt;, &lt;=, =&lt;&lt;, ==, &gt;, &gt;=, &gt;&gt;, &gt;&gt;=, ^, ^^, ++, ||

<span style="color:#7a7c7d;">-- functions</span>

<span style="color:#8e44ad;">abs</span>, <span style="color:#8e44ad;">acos</span>, <span style="color:#8e44ad;">acosh</span>, <span style="color:#8e44ad;">all</span>, <span style="color:#8e44ad;">and</span>, <span style="color:#8e44ad;">any</span>, <span style="color:#8e44ad;">appendFile</span>,
<span style="color:#8e44ad;">approxRational</span>, <span style="color:#8e44ad;">asTypeOf</span>, <span style="color:#8e44ad;">asin</span>, <span style="color:#8e44ad;">asinh</span>, <span style="color:#8e44ad;">atan</span>, <span style="color:#8e44ad;">atan2</span>, <span style="color:#8e44ad;">atanh</span>, <span style="color:#8e44ad;">basicIORun</span>,
<span style="color:#8e44ad;">break</span>, <span style="color:#8e44ad;">catch</span>, <span style="color:#8e44ad;">ceiling</span>, <span style="color:#8e44ad;">chr</span>, <span style="color:#8e44ad;">compare</span>, <span style="color:#8e44ad;">concat</span>, <span style="color:#8e44ad;">concatMap</span>, <span style="color:#8e44ad;">const</span>, <span style="color:#8e44ad;">cos</span>, <span style="color:#8e44ad;">cosh</span>,
<span style="color:#8e44ad;">curry</span>, <span style="color:#8e44ad;">cycle</span>, <span style="color:#8e44ad;">decodeFloat</span>, <span style="color:#8e44ad;">denominator</span>, <span style="color:#8e44ad;">digitToInt</span>, <span style="color:#8e44ad;">div</span>, <span style="color:#8e44ad;">divMod</span>, <span style="color:#8e44ad;">drop</span>,
<span style="color:#8e44ad;">dropWhile</span>, <span style="color:#8e44ad;">either</span>, <span style="color:#8e44ad;">elem</span>, <span style="color:#8e44ad;">encodeFloat</span>, <span style="color:#8e44ad;">enumFrom</span>, <span style="color:#8e44ad;">enumFromThen</span>,
<span style="color:#8e44ad;">enumFromThenTo</span>, <span style="color:#8e44ad;">enumFromTo</span>, <span style="color:#8e44ad;">error</span>, <span style="color:#8e44ad;">even</span>, <span style="color:#8e44ad;">exp</span>, <span style="color:#8e44ad;">exponent</span>, <span style="color:#8e44ad;">fail</span>, <span style="color:#8e44ad;">filter</span>, <span style="color:#8e44ad;">flip</span>,
<span style="color:#8e44ad;">floatDigits</span>, <span style="color:#8e44ad;">floatRadix</span>, <span style="color:#8e44ad;">floatRange</span>, <span style="color:#8e44ad;">floor</span>, <span style="color:#8e44ad;">fmap</span>, <span style="color:#8e44ad;">foldl</span>, <span style="color:#8e44ad;">foldl1</span>, <span style="color:#8e44ad;">foldr</span>,
<span style="color:#8e44ad;">foldr1</span>, <span style="color:#8e44ad;">fromDouble</span>, <span style="color:#8e44ad;">fromEnum</span>, <span style="color:#8e44ad;">fromInt</span>, <span style="color:#8e44ad;">fromInteger</span>, <span style="color:#8e44ad;">fromIntegral</span>,
<span style="color:#8e44ad;">fromRational</span>, <span style="color:#8e44ad;">fst</span>, <span style="color:#8e44ad;">gcd</span>, <span style="color:#8e44ad;">getChar</span>, <span style="color:#8e44ad;">getContents</span>, <span style="color:#8e44ad;">getLine</span>, <span style="color:#8e44ad;">head</span>, <span style="color:#8e44ad;">id</span>, <span style="color:#8e44ad;">inRange</span>,
<span style="color:#8e44ad;">index</span>, <span style="color:#8e44ad;">init</span>, <span style="color:#8e44ad;">intToDigit</span>, <span style="color:#8e44ad;">interact</span>, <span style="color:#8e44ad;">ioError</span>, <span style="color:#8e44ad;">isAlpha</span>, <span style="color:#8e44ad;">isAlphaNum</span>, <span style="color:#8e44ad;">isAscii</span>,
<span style="color:#8e44ad;">isControl</span>, <span style="color:#8e44ad;">isDenormalized</span>, <span style="color:#8e44ad;">isDigit</span>, <span style="color:#8e44ad;">isHexDigit</span>, <span style="color:#8e44ad;">isIEEE</span>, <span style="color:#8e44ad;">isInfinite</span>, <span style="color:#8e44ad;">isLower</span>,
<span style="color:#8e44ad;">isNaN</span>, <span style="color:#8e44ad;">isNegativeZero</span>, <span style="color:#8e44ad;">isOctDigit</span>, <span style="color:#8e44ad;">isPrint</span>, <span style="color:#8e44ad;">isSpace</span>, <span style="color:#8e44ad;">isUpper</span>, <span style="color:#8e44ad;">iterate</span>, <span style="color:#8e44ad;">last</span>,
<span style="color:#8e44ad;">lcm</span>, <span style="color:#8e44ad;">length</span>, <span style="color:#8e44ad;">lex</span>, <span style="color:#8e44ad;">lexDigits</span>, <span style="color:#8e44ad;">lexLitChar</span>, <span style="color:#8e44ad;">lines</span>, <span style="color:#8e44ad;">log</span>, <span style="color:#8e44ad;">logBase</span>, <span style="color:#8e44ad;">lookup</span>, <span style="color:#8e44ad;">map</span>,
<span style="color:#8e44ad;">mapM</span>, <span style="color:#8e44ad;">mapM_</span>, <span style="color:#8e44ad;">max</span>, <span style="color:#8e44ad;">maxBound</span>, <span style="color:#8e44ad;">maximum</span>, <span style="color:#8e44ad;">maybe</span>, <span style="color:#8e44ad;">min</span>, <span style="color:#8e44ad;">minBound</span>, <span style="color:#8e44ad;">minimum</span>, <span style="color:#8e44ad;">mod</span>,
<span style="color:#8e44ad;">negate</span>, <span style="color:#8e44ad;">not</span>, <span style="color:#8e44ad;">notElem</span>, <span style="color:#8e44ad;">null</span>, <span style="color:#8e44ad;">numerator</span>, <span style="color:#8e44ad;">odd</span>, <span style="color:#8e44ad;">or</span>, <span style="color:#8e44ad;">ord</span>, <span style="color:#8e44ad;">otherwise</span>, <span style="color:#8e44ad;">pi</span>, <span style="color:#8e44ad;">pred</span>,
<span style="color:#8e44ad;">primExitWith</span>, <span style="color:#8e44ad;">print</span>, <span style="color:#8e44ad;">product</span>, <span style="color:#8e44ad;">properFraction</span>, <span style="color:#8e44ad;">putChar</span>, <span style="color:#8e44ad;">putStr</span>, <span style="color:#8e44ad;">putStrLn</span>,
<span style="color:#8e44ad;">quot</span>, <span style="color:#8e44ad;">quotRem</span>, <span style="color:#8e44ad;">range</span>, <span style="color:#8e44ad;">rangeSize</span>, <span style="color:#8e44ad;">read</span>, <span style="color:#8e44ad;">readDec</span>, <span style="color:#8e44ad;">readFile</span>, <span style="color:#8e44ad;">readFloat</span>,
<span style="color:#8e44ad;">readHex</span>, <span style="color:#8e44ad;">readIO</span>, <span style="color:#8e44ad;">readInt</span>, <span style="color:#8e44ad;">readList</span>, <span style="color:#8e44ad;">readLitChar</span>, <span style="color:#8e44ad;">readLn</span>, <span style="color:#8e44ad;">readOct</span>, <span style="color:#8e44ad;">readParen</span>,
<span style="color:#8e44ad;">readSigned</span>, <span style="color:#8e44ad;">reads</span>, <span style="color:#8e44ad;">readsPrec</span>, <span style="color:#8e44ad;">realToFrac</span>, <span style="color:#8e44ad;">recip</span>, <span style="color:#8e44ad;">rem</span>, <span style="color:#8e44ad;">repeat</span>, <span style="color:#8e44ad;">replicate</span>,
<span style="color:#8e44ad;">return</span>, <span style="color:#8e44ad;">reverse</span>, <span style="color:#8e44ad;">round</span>, <span style="color:#8e44ad;">scaleFloat</span>, <span style="color:#8e44ad;">scanl</span>, <span style="color:#8e44ad;">scanl1</span>, <span style="color:#8e44ad;">scanr</span>, <span style="color:#8e44ad;">scanr1</span>, <span style="color:#8e44ad;">seq</span>,
<span style="color:#8e44ad;">sequence</span>, <span style="color:#8e44ad;">sequence_</span>, <span style="color:#8e44ad;">show</span>, <span style="color:#8e44ad;">showChar</span>, <span style="color:#8e44ad;">showInt</span>, <span style="color:#8e44ad;">showList</span>, <span style="color:#8e44ad;">showLitChar</span>,
<span style="color:#8e44ad;">showParen</span>, <span style="color:#8e44ad;">showSigned</span>, <span style="color:#8e44ad;">showString</span>, <span style="color:#8e44ad;">shows</span>, <span style="color:#8e44ad;">showsPrec</span>, <span style="color:#8e44ad;">significand</span>, <span style="color:#8e44ad;">signum</span>,
<span style="color:#8e44ad;">sin</span>, <span style="color:#8e44ad;">sinh</span>, <span style="color:#8e44ad;">snd</span>, <span style="color:#8e44ad;">span</span>, <span style="color:#8e44ad;">splitAt</span>, <span style="color:#8e44ad;">sqrt</span>, <span style="color:#8e44ad;">subtract</span>, <span style="color:#8e44ad;">succ</span>, <span style="color:#8e44ad;">sum</span>, <span style="color:#8e44ad;">tail</span>, <span style="color:#8e44ad;">take</span>,
<span style="color:#8e44ad;">either</span>, <span style="color:#8e44ad;">elem</span>, <span style="color:#8e44ad;">encodeFloat</span>, <span style="color:#8e44ad;">enumFrom</span>, <span style="color:#8e44ad;">enumFromThen</span>, <span style="color:#8e44ad;">enumFromThenTo</span>,
<span style="color:#8e44ad;">enumFromTo</span>, <span style="color:#8e44ad;">error</span>, <span style="color:#8e44ad;">even</span>, <span style="color:#8e44ad;">exp</span>, <span style="color:#8e44ad;">exponent</span>, <span style="color:#8e44ad;">fail</span>, <span style="color:#8e44ad;">filter</span>, <span style="color:#8e44ad;">flip</span>, <span style="color:#8e44ad;">floatDigits</span>,
<span style="color:#8e44ad;">floatRadix</span>, <span style="color:#8e44ad;">floatRange</span>, <span style="color:#8e44ad;">floor</span>, <span style="color:#8e44ad;">fmap</span>, <span style="color:#8e44ad;">takeWhile</span>, <span style="color:#8e44ad;">tan</span>, <span style="color:#8e44ad;">tanh</span>, <span style="color:#8e44ad;">threadToIOResult</span>,
<span style="color:#8e44ad;">toEnum</span>, <span style="color:#8e44ad;">toInt</span>, <span style="color:#8e44ad;">toInteger</span>, <span style="color:#8e44ad;">toLower</span>, <span style="color:#8e44ad;">toRational</span>, <span style="color:#8e44ad;">toUpper</span>, <span style="color:#8e44ad;">truncate</span>, <span style="color:#8e44ad;">uncurry</span>,
<span style="color:#8e44ad;">undefined</span>, <span style="color:#8e44ad;">unlines</span>, <span style="color:#8e44ad;">until</span>, <span style="color:#8e44ad;">unwords</span>, <span style="color:#8e44ad;">unzip</span>, <span style="color:#8e44ad;">unzip3</span>, <span style="color:#8e44ad;">userError</span>, <span style="color:#8e44ad;">words</span>,
<span style="color:#8e44ad;">writeFile</span>, <span style="color:#8e44ad;">zip</span>, <span style="color:#8e44ad;">zip3</span>, <span style="color:#8e44ad;">zipWith</span>, <span style="color:#8e44ad;">zipWith3</span>

<span style="color:#7a7c7d;">-- type constructors</span>

<span style="color:#2980b9;">Bool</span>, <span style="color:#2980b9;">Char</span>, <span style="color:#2980b9;">Double</span>, <span style="color:#2980b9;">Either</span>, <span style="color:#2980b9;">FilePath</span>, <span style="color:#2980b9;">Float</span>, <span style="color:#2980b9;">IO</span>, <span style="color:#2980b9;">IOError</span>, <span style="color:#2980b9;">Integer</span>, <span style="color:#2980b9;">Int</span>, <span style="color:#2980b9;">Maybe</span>,
<span style="color:#2980b9;">Ordering</span>, <span style="color:#2980b9;">Rational</span>, <span style="color:#2980b9;">Ratio</span>, <span style="color:#2980b9;">ReadS</span>, <span style="color:#2980b9;">ShowS</span>, <span style="color:#2980b9;">String</span>

<span style="color:#7a7c7d;">-- classes</span>

<span style="color:#2980b9;">Bounded</span>, <span style="color:#2980b9;">Enum</span>, <span style="color:#2980b9;">Eq</span>, <span style="color:#2980b9;">Floating</span>, <span style="color:#2980b9;">Fractional</span>, <span style="color:#2980b9;">Functor</span>, <span style="color:#2980b9;">Integral</span>, <span style="color:#2980b9;">Ix</span>, <span style="color:#2980b9;">Monad</span>, <span style="color:#2980b9;">Num</span>, <span style="color:#2980b9;">Ord</span>, <span style="color:#2980b9;">Read</span>, <span style="color:#2980b9;">RealFloat</span>,
<span style="color:#2980b9;">RealFrac</span>, <span style="color:#2980b9;">Real</span>, <span style="color:#2980b9;">Show</span>

<span style="color:#7a7c7d;">-- data constructors</span>

<span style="color:#2980b9;">EQ</span>, <span style="color:#2980b9;">False</span>, <span style="color:#2980b9;">GT</span>, <span style="color:#2980b9;">Just</span>, <span style="color:#2980b9;">LT</span>, <span style="color:#2980b9;">Left</span>, <span style="color:#2980b9;">Nothing</span>, <span style="color:#2980b9;">Right</span>, <span style="color:#2980b9;">True</span>

<span style="color:#7a7c7d;">-- promoted data constructors</span>

<span style="color:#2980b9;">'True</span>

<span style="color:#7a7c7d;">-- pragma with compiler flags</span>

<span style="color:#27ae60;">{-# OPTIONS_GHC -fno-warn-orphans #-}</span>

<span style="color:#7a7c7d;">-- multiline pragma with language extensions</span>

<span style="color:#27ae60;">{-# LANGUAGE OverlappingInstances,</span>
<span style="color:#27ae60;">             BangPatterns</span>
<span style="color:#27ae60;">#-}</span>
</pre></body></html>
